# Payment Methods

Payment methods are used when paying for orders in the Cashier or other order-taking channels.

# The Payment Method Object

# Sample

{
    "id": "8d08be48",
    "name": "Cash",
    "code": "cash",
    "name_localized": null,
    "type": 1,
    "auto_open_drawer": true,
    "is_active": true,
    "created_at": "2019-02-25 18:36:18",
    "updated_at": "2019-02-25 18:36:18",
    "deleted_at": null,
    "index": 6
}

# Attributes

Field Type Rule Description
id string Unique identifier for the payment method
name* string updatable Name of the payment method
name_localized string nullable updatable Localized payment method name if business uses localization.
code string updatable Payment method code
auto_open_drawer boolean updatable True if cash drawer opens when choosing this payment method
type* integer The Type of the payment method
is_active boolean updatable True if the payment method is active and can be used
index integer updatable The sort index of the payment method.
created_at string sortable Time at which the object was created in UTC. YYYY-MM-DD HH-MM-SS
updated_at string sortable Time at which the object was updated in UTC. YYYY-MM-DD HH-MM-SS
deleted_at string nullable Time at which the object was deleted in UTC. YYYY-MM-DD HH-MM-SS

# Payment Method Types

Type Description
1 Cash
2 Card
3 Other
4 Gift Card
5 House Account
7 3rd party

# Valid Types

If your application has the admin.write API scope then you can create payment methods of types (1, 2, 3, 7).

If your application has the orders.limited.pay API scope only, then you can only manage payment methods of type "7".

Refer to Types.

# List Payment Methods

GET /payment_methods

# Scope

general.read

# Filters

  • id
  • name
  • name_localized
  • code
  • is_active
  • type
  • auto_open_drawer
  • updated_after
  • is_deleted
  • created_on
  • updated_on
  • deleted_on

# Response

{
    "data": [
        {
            "id": "8d08be48",
            "name": "Cash",
            "code": "cash",
            "name_localized": null,
            "type": 1,
            "auto_open_drawer": true,
            "is_active": true,
            "created_at": "2019-02-25 18:36:18",
            "updated_at": "2019-02-25 18:36:18",
            "deleted_at": null,
            "index": 6
        }
    ]
}

# Get Payment Method

GET /payment_methods/{paymentMethodId}

# Scope

general.read

# Response

{
    "data": {
        "id": "8d08be48",
        "name": "Cash",
        "code": "cash",
        "name_localized": null,
        "type": 1,
        "auto_open_drawer": true,
        "is_active": true,
        "created_at": "2019-02-25 18:36:18",
        "updated_at": "2019-02-25 18:36:18",
        "deleted_at": null,
        "index": 6
    }
}

# Create Payment Method

POST /payment_methods

# Scope

  • admin.write
  • orders.limited.pay

# Request

{
    "name": "Cash",
    "code": "cash",
    "name_localized": null,
    "type": 1,
    "auto_open_drawer": true,
    "is_active": true
}

# Response

{
    "data": {
        "id": "8d08be48",
        "name": "Cash",
        "code": "cash",
        "name_localized": null,
        "type": 1,
        "auto_open_drawer": true,
        "is_active": true,
        "created_at": "2019-02-25 18:36:18",
        "updated_at": "2019-02-25 18:36:18",
        "deleted_at": null,
        "index": 6
    }
}

# Update Payment Method

PUT /payment_methods/{paymentMethodId}

# Scope

  • admin.write
  • orders.limited.pay

# Request

{
    "name": "Cash",
    "code": "cash",
    "name_localized": null,
    "auto_open_drawer": true,
    "is_active": true
}

# Response

{
    "data": {
        "id": "8d08be48",
        "name": "Cash",
        "code": "cash",
        "name_localized": null,
        "type": 1,
        "auto_open_drawer": true,
        "is_active": true,
        "created_at": "2019-02-25 18:36:18",
        "updated_at": "2019-02-25 18:36:18",
        "deleted_at": null,
        "index": 6
    }
}

# Delete Payment Method

DELETE /payment_methods/{paymentMethodId}

# Scope

  • admin.write
  • orders.limited.pay

The API will respond with 200 indicating that the payment method has been deleted.

# Restore Payment Methods

PUT /payment_methods/{paymentMethodId}/restore

# Scope

admin.restore

The API will respond with 200 indicating that the payment method has been restored.

Last Updated: 20/9/2023, 2:10:11 PM